package com.fuyin.service.user;

import com.fuyin.commons.response.BaseResponse;
import com.fuyin.dto.params.LoginParam;
import com.fuyin.entity.ReportInfo;
import com.fuyin.entity.User;
import org.springframework.security.core.userdetails.UserDetails;

import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;

/**
 * @author yuanxilan (yuanxilan@keep.com)
 * @Description
 * @date 2021年10月23日 3:27 下午
 * @since
 */
public interface UserService {

    BaseResponse login(LoginParam param);

    BaseResponse register(LoginParam param, HttpServletRequest request);

    UserDetails loadUserByUsername(String username);

    User getUserByUserName(String username);

    BaseResponse<ArrayList<User>> test(Integer pageNum, Integer pageSize);

    BaseResponse logout(String token);

    BaseResponse updatePasswordByOldPassword(String userName, String oldPassword, String newPassword);

    BaseResponse updatePasswordByHobby(String userName, String password, String hobby);

    BaseResponse<ArrayList<ReportInfo>> getReportInfo(String token, Integer pageSize, Integer pageNum, Integer type);

    User findUserByEmail(String email);

    String saveAccount(String token1);

    String changeEmail(String token);

    BaseResponse<User> getUserInfo(String token);

//    List<Resource> getResourceList(Long id);
}
